Skip to content

Commit

Permalink
ITS DCS parser: added configurable url to retrieve RCT headers (Alice…
Browse files Browse the repository at this point in the history
…O2Group#11978)

* added configurable url to retrieve RCT headers

* default ccdb to o2 ccdb internal
  • Loading branch information
iravasen authored Oct 4, 2023
1 parent 1674604 commit 9fe0d97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ class ITSDCSParser : public Task

// ITS Map
o2::itsmft::ChipMappingITS mp;

// CCDB url for RCT headers
std::string mCcdbUrlRct = "http://o2-ccdb.internal";
};

// Create a processor spec
Expand Down
11 changes: 8 additions & 3 deletions Detectors/ITSMFT/ITS/workflow/src/DCSParserSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ void ITSDCSParser::init(InitContext& ic)

this->mCcdbUrl = ic.options().get<std::string>("ccdb-url");

this->mCcdbUrlRct = ic.options().get<std::string>("ccdb-url-rct");

this->mVerboseOutput = ic.options().get<bool>("verbose");

return;
Expand Down Expand Up @@ -469,7 +471,7 @@ void ITSDCSParser::pushToCCDB(ProcessingContext& pc)
long tstart = 0, tend = 0;
// retireve run start/stop times from CCDB
o2::ccdb::CcdbApi api;
api.init("http://alice-ccdb.cern.ch");
api.init(mCcdbUrlRct);
// Initialize empty metadata object for search
std::map<std::string, std::string> metadata;
std::map<std::string, std::string> headers = api.retrieveHeaders(
Expand Down Expand Up @@ -582,7 +584,9 @@ void ITSDCSParser::appendDeadChipObj()

unsigned short int globchipID = getGlobalChipID(hicPos, hS, chipInMod);
this->mDeadMap.maskFullChip(globchipID);
LOG(info) << "Masking dead chip " << globchipID;
if (mVerboseOutput) {
LOG(info) << "Masking dead chip " << globchipID;
}
}
}

Expand Down Expand Up @@ -660,7 +664,8 @@ DataProcessorSpec getITSDCSParserSpec()
AlgorithmSpec{adaptFromTask<o2::its::ITSDCSParser>()},
Options{
{"verbose", VariantType::Bool, false, {"Use verbose output mode"}},
{"ccdb-url", VariantType::String, "", {"CCDB url, default is empty (i.e. send output to CCDB populator workflow)"}}}};
{"ccdb-url", VariantType::String, "", {"CCDB url, default is empty (i.e. send output to CCDB populator workflow)"}},
{"ccdb-url-rct", VariantType::String, "", {"CCDB url from where to get RCT object for headers, default is o2-ccdb.internal. Use http://alice-ccdb.cern.ch for local tests"}}}};
}
} // namespace its
} // namespace o2

0 comments on commit 9fe0d97

Please sign in to comment.