Skip to content

Commit 5b96c9a

Browse files
chiarazampollishahor02
authored andcommitted
Filling RCT information when uploading GRP at end of run
1 parent 22b8799 commit 5b96c9a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Detectors/GRP/workflows/src/create-grp-ecs.cxx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@ void createGRPECSObject(const std::string& dataPeriod,
7777
// long ts = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
7878
api.storeAsTFileAny(&grpecs, "GLO/Config/GRPECS", metadata, tstart, tendVal); // making it 1-year valid to be sure we have something
7979
LOGP(info, "Uploaded to {}/{} with validity {}:{}", ccdbServer, "GLO/Config/GRPECS", tstart, tendVal);
80+
// also storing the RCT/Info/RunInformation entry in case the run type is PHYSICS and if we are at the end of run
81+
if (runType == GRPECSObject::RunType::PHYSICS && tend < tstart) {
82+
char tempChar;
83+
std::map<std::string, std::string> mdRCT;
84+
mdRCT["SOR"] = std::to_string(tstart);
85+
mdRCT["EOR"] = std::to_string(tend);
86+
long startValRCT = (long)run;
87+
long endValRCT = (long)(run + 1);
88+
api.storeAsBinaryFile(&tempChar, sizeof(tempChar), "tmp.dat", "char", "RCT/Info/RunInformation", mdRCT, startValRCT, endValRCT);
89+
LOGP(info, "Uploaded RCT object to {}/{} with validity {}:{}", ccdbServer, "RCT/Info/RunInformation", startValRCT, endValRCT);
90+
}
8091
} else { // write a local file
8192
auto fname = o2::base::NameConf::getGRPECSFileName();
8293
TFile grpF(fname.c_str(), "recreate");

0 commit comments

Comments
 (0)