Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Detectors/CPV/base/src/Geometry.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ bool Geometry::absToRelNumbering(unsigned short absId, short* relid)
// relid[1] = Column number inside a CPV module (Phi coordinate)
// relid[2] = Row number inside a CPV module (Z coordinate)
if (absId >= kNCHANNELS) {
LOG(DEBUG) << "Wrong absId = " << absId << " > kNCHANNELS=" << kNCHANNELS;
LOG(debug) << "Wrong absId = " << absId << " > kNCHANNELS=" << kNCHANNELS;
return false;
}
const short nCPV = kNumberOfCPVPadsPhi * kNumberOfCPVPadsZ;
Expand Down Expand Up @@ -110,15 +110,15 @@ bool Geometry::hwaddressToAbsId(short ccId, short dil, short gas, short pad, uns
//check if hw address is valid
bool isGoodHWAddress = true;
if (pad < 0 || pad >= kNPAD) {
LOG(DEBUG) << "Geometry::hwaddressToAbsId() : Wrong pad address: pad=" << pad << " >= kNPAD=" << kNPAD;
LOG(debug) << "Geometry::hwaddressToAbsId() : Wrong pad address: pad=" << pad << " >= kNPAD=" << kNPAD;
isGoodHWAddress = false;
}
if (dil < 0 || dil >= kNDilogic) {
LOG(DEBUG) << "Geometry::hwaddressToAbsId() : Wrong dil address: dil=" << dil << " >= kNDilogic=" << kNDilogic;
LOG(debug) << "Geometry::hwaddressToAbsId() : Wrong dil address: dil=" << dil << " >= kNDilogic=" << kNDilogic;
isGoodHWAddress = false;
}
if (gas < 0 || gas >= kNGas) {
LOG(DEBUG) << "Geometry::hwaddressToAbsId() : Wrong gasiplex address: gas=" << gas << " >= kNGas=" << kNGas;
LOG(debug) << "Geometry::hwaddressToAbsId() : Wrong gasiplex address: gas=" << gas << " >= kNGas=" << kNGas;
isGoodHWAddress = false;
}
//return false in no success case
Expand Down Expand Up @@ -151,15 +151,15 @@ bool Geometry::absIdToHWaddress(unsigned short absId, short& ccId, short& dil, s

bool isAbsIdOk = true;
if (pad < 0 || pad >= kNPAD) {
LOG(DEBUG) << "Wrong pad address: pad=" << pad << " >= kNPAD=" << kNPAD;
LOG(debug) << "Wrong pad address: pad=" << pad << " >= kNPAD=" << kNPAD;
isAbsIdOk = false;
}
if (dil < 0 || dil >= kNDilogic) {
LOG(DEBUG) << "Wrong dil address: dil=" << dil << " >= kNDilogic=" << kNDilogic;
LOG(debug) << "Wrong dil address: dil=" << dil << " >= kNDilogic=" << kNDilogic;
isAbsIdOk = false;
}
if (gas < 0 || gas >= kNGas) {
LOG(DEBUG) << "Wrong gasiplex address: gas=" << gas << " >= kNGas=" << kNGas;
LOG(debug) << "Wrong gasiplex address: gas=" << gas << " >= kNGas=" << kNGas;
isAbsIdOk = false;
}
return isAbsIdOk;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void CPVBadMapCalibDevice::run(o2::framework::ProcessingContext& ctx)
spectra = static_cast<TH2F*>(f.Get("Gains"));
}
if (!spectra) {
LOG(ERROR) << "ERROR: can not read histo Gains from file " << filename.data();
LOG(error) << "ERROR: can not read histo Gains from file " << filename.data();
return;
}
float meanOccupancy = spectra->Integral() / spectra->GetNbinsX();
Expand Down Expand Up @@ -90,7 +90,7 @@ void CPVBadMapCalibDevice::run(o2::framework::ProcessingContext& ctx)
pedestals = static_cast<TH2F*>(f.Get("Mean"));
}
if (!pedestals) {
LOG(ERROR) << "ERROR: can not read histo Mean from file " << filename.data();
LOG(error) << "ERROR: can not read histo Mean from file " << filename.data();
return;
}
TH1D* proj = pedestals->ProjectionY("m");
Expand Down Expand Up @@ -142,7 +142,7 @@ void CPVBadMapCalibDevice::run(o2::framework::ProcessingContext& ctx)
void CPVBadMapCalibDevice::endOfStream(o2::framework::EndOfStreamContext& ec)
{

LOG(INFO) << "[CPVBadMapCalibDevice - endOfStream]";
LOG(info) << "[CPVBadMapCalibDevice - endOfStream]";
//calculate stuff here
}

Expand All @@ -167,7 +167,7 @@ void CPVBadMapCalibDevice::sendOutput(DataAllocator& output)
std::map<std::string, std::string> md;
info.setMetaData(md);

LOG(INFO) << "Sending object CPV/Calib/BadChannelMap";
LOG(info) << "Sending object CPV/Calib/BadChannelMap";

header::DataHeader::SubSpecificationType subSpec{(header::DataHeader::SubSpecificationType)0};
output.snapshot(Output{o2::calibration::Utils::gDataOriginCDBPayload, "CPV_BadChanMap", subSpec}, *image.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void CPVGainCalibDevice::run(o2::framework::ProcessingContext& ctx)
try {
rawreader.next();
} catch (RawErrorType_t e) {
LOG(ERROR) << "Raw decoding error " << (int)e;
LOG(error) << "Raw decoding error " << (int)e;
//if problem in header, abandon this page
if (e == RawErrorType_t::kRDH_DECODING) {
break;
Expand Down Expand Up @@ -89,7 +89,7 @@ void CPVGainCalibDevice::run(o2::framework::ProcessingContext& ctx)
void CPVGainCalibDevice::endOfStream(o2::framework::EndOfStreamContext& ec)
{

LOG(INFO) << "[CPVGainCalibDevice - endOfStream]";
LOG(info) << "[CPVGainCalibDevice - endOfStream]";
//calculate stuff here
calculateGains();
checkGains();
Expand Down Expand Up @@ -117,7 +117,7 @@ void CPVGainCalibDevice::sendOutput(DataAllocator& output)
std::map<std::string, std::string> md;
info.setMetaData(md);

LOG(INFO) << "Sending object CPV/Calib/CalibParams";
LOG(info) << "Sending object CPV/Calib/CalibParams";

header::DataHeader::SubSpecificationType subSpec{(header::DataHeader::SubSpecificationType)0};

Expand All @@ -131,13 +131,13 @@ void CPVGainCalibDevice::sendOutput(DataAllocator& output)
time_t now = time(nullptr);
tm* ltm = localtime(&now);
filename += TString::Format("_%d%d%d%d%d.root", 1 + ltm->tm_min, 1 + ltm->tm_hour, ltm->tm_mday, 1 + ltm->tm_mon, 1970 + ltm->tm_year);
LOG(DEBUG) << "opening file " << filename.data();
LOG(debug) << "opening file " << filename.data();
TFile fout(filename.data(), "RECREATE");
mMean->Write();
fout.Close();
} else {
std::string filename = mPath + "CPVGains.root";
LOG(INFO) << "statistics not sufficient yet: " << mMean->Integral() / mMean->GetNbinsX() << ", writing file " << filename;
LOG(info) << "statistics not sufficient yet: " << mMean->Integral() / mMean->GetNbinsX() << ", writing file " << filename;
TFile fout(filename.data(), "RECREATE");
mMean->Write();
fout.Close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void CPVPedestalCalibDevice::run(o2::framework::ProcessingContext& ctx)
try {
rawreader.next();
} catch (RawErrorType_t e) {
LOG(ERROR) << "Raw decoding error " << (int)e;
LOG(error) << "Raw decoding error " << (int)e;
//if problem in header, abandon this page
if (e == RawErrorType_t::kRDH_DECODING) {
break;
Expand Down Expand Up @@ -81,7 +81,7 @@ void CPVPedestalCalibDevice::run(o2::framework::ProcessingContext& ctx)
void CPVPedestalCalibDevice::endOfStream(o2::framework::EndOfStreamContext& ec)
{

LOG(INFO) << "[CPVPedestalCalibDevice - endOfStream]";
LOG(info) << "[CPVPedestalCalibDevice - endOfStream]";
//calculate stuff here
calculatePedestals();
checkPedestals();
Expand Down Expand Up @@ -110,14 +110,14 @@ void CPVPedestalCalibDevice::sendOutput(DataAllocator& output)
std::map<std::string, std::string> md;
info.setMetaData(md);

LOG(INFO) << "Sending object CPV/Calib/Pedestals";
LOG(info) << "Sending object CPV/Calib/Pedestals";

header::DataHeader::SubSpecificationType subSpec{(header::DataHeader::SubSpecificationType)0};
output.snapshot(Output{o2::calibration::Utils::gDataOriginCDBPayload, "CPV_PEDESTALS", subSpec}, *image.get());
output.snapshot(Output{o2::calibration::Utils::gDataOriginCDBWrapper, "CPV_PEDESTALS", subSpec}, info);
}
//Anyway send change to QC
LOG(INFO) << "[CPVPedestalCalibDevice - run] Writing ";
LOG(info) << "[CPVPedestalCalibDevice - run] Writing ";
output.snapshot(o2::framework::Output{"CPV", "PEDDIFF", 0, o2::framework::Lifetime::Timeframe}, mPedDiff);

//Write pedestal distributions to calculate bad map
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
auto doBadMap = configcontext.options().get<bool>("badmap");
auto path = configcontext.options().get<std::string>("path");
if (doPedestals && doGain) {
LOG(FATAL) << "Can not run pedestal and gain calibration simulteneously";
LOG(fatal) << "Can not run pedestal and gain calibration simulteneously";
}

LOG(INFO) << "CPV Calibration workflow: options";
LOG(INFO) << "useCCDB = " << useCCDB;
LOG(info) << "CPV Calibration workflow: options";
LOG(info) << "useCCDB = " << useCCDB;
if (doPedestals) {
LOG(INFO) << "pedestals ";
LOG(info) << "pedestals ";
specs.emplace_back(o2::cpv::getPedestalCalibSpec(useCCDB, forceUpdate, path));
} else {
if (doGain) {
LOG(INFO) << "gain calculation";
LOG(info) << "gain calculation";
specs.emplace_back(o2::cpv::getGainCalibSpec(useCCDB, forceUpdate, path));
}
}
if (doBadMap) {
LOG(INFO) << "bad map calculation ";
LOG(info) << "bad map calculation ";
short m = 0;
specs.emplace_back(o2::cpv::getBadMapCalibSpec(useCCDB, forceUpdate, path, m));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class PedestalCalibrator final : public o2::calibration::TimeSlotCalibration<o2:

bool hasEnoughData(const TimeSlot& slot) const final
{
LOG(INFO) << "hasEnoughData() is being called";
LOG(info) << "hasEnoughData() is being called";
return slot.getContainer()->mNEvents >= mMinEvents;
}
void initOutput() final;
Expand Down
6 changes: 3 additions & 3 deletions Detectors/CPV/calib/src/PedestalCalibrator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ void PedestalCalibData::merge(const PedestalCalibData* prev)
mPedestalSpectra[i] += prev->mPedestalSpectra[i];
}
mNEvents += prev->mNEvents;
LOG(INFO) << "Merged TimeSlot with previous one. Now we have " << mNEvents << " events.";
LOG(info) << "Merged TimeSlot with previous one. Now we have " << mNEvents << " events.";
}
//___________________________________________________________________
void PedestalCalibData::print()
{
LOG(INFO) << "PedestalCalibData::mNEvents = " << mNEvents;
LOG(info) << "PedestalCalibData::mNEvents = " << mNEvents;
}
//___________________________________________________________________
//=======================PedestalCalibrator==========================
Expand Down Expand Up @@ -250,7 +250,7 @@ void PedestalCalibrator::finalizeSlot(TimeSlot& slot)
auto& nSigmasZS = cpvParams.mZSnSigmas;

PedestalCalibData* calibData = slot.getContainer();
LOG(INFO) << "PedestalCalibrator::finalizeSlot() : finalizing slot "
LOG(info) << "PedestalCalibrator::finalizeSlot() : finalizing slot "
<< slot.getTFStart() << " <= TF <= " << slot.getTFEnd() << " with " << calibData->mNEvents << " events.";

o2::cpv::Geometry geo; // CPV geometry object
Expand Down
20 changes: 10 additions & 10 deletions Detectors/CPV/calib/testWorkflow/PedestalCalibratorSpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,27 @@ class CPVPedestalCalibDevice : public o2::framework::Task
mCalibrator->setUpdateAtTheEndOfRunOnly();
}
mCalibrator->setCheckIntervalInfiniteSlot(updateInterval);
LOG(INFO) << "CPVPedestalCalibDevice initialized";
LOG(INFO) << "tf-per-slot = " << slotL;
LOG(INFO) << "max-delay = " << delay;
LOG(INFO) << "updateInterval = " << updateInterval;
LOG(INFO) << "updateAtTheEndOfRunOnly = " << updateAtTheEndOfRunOnly;
LOG(info) << "CPVPedestalCalibDevice initialized";
LOG(info) << "tf-per-slot = " << slotL;
LOG(info) << "max-delay = " << delay;
LOG(info) << "updateInterval = " << updateInterval;
LOG(info) << "updateAtTheEndOfRunOnly = " << updateAtTheEndOfRunOnly;
}
//_________________________________________________________________
void run(o2::framework::ProcessingContext& pc) final
{
auto tfcounter = o2::header::get<o2::framework::DataProcessingHeader*>(pc.inputs().get("digits").header)->startTime;
auto&& digits = pc.inputs().get<gsl::span<o2::cpv::Digit>>("digits");
auto&& trigrecs = pc.inputs().get<gsl::span<o2::cpv::TriggerRecord>>("trigrecs");
LOG(INFO) << "Processing TF " << tfcounter << " with " << digits.size() << " digits in " << trigrecs.size() << " trigger records.";
LOG(info) << "Processing TF " << tfcounter << " with " << digits.size() << " digits in " << trigrecs.size() << " trigger records.";
auto& slotTF = mCalibrator->getSlotForTF(tfcounter);

for (auto trigrec = trigrecs.begin(); trigrec != trigrecs.end(); trigrec++) { //event loop
// here we're filling TimeSlot event by event
// and when last event is reached we call mCalibrator->process() to finalize the TimeSlot
auto&& digitsInOneEvent = digits.subspan((*trigrec).getFirstEntry(), (*trigrec).getNumberOfObjects());
if ((trigrec + 1) == trigrecs.end()) { //last event in current TF, let's process corresponding TimeSlot
//LOG(INFO) << "last event, I call mCalibrator->process()";
//LOG(info) << "last event, I call mCalibrator->process()";
mCalibrator->process(tfcounter, digitsInOneEvent); //fill TimeSlot with digits from 1 event and check slots for finalization
} else {
slotTF.getContainer()->fill(digitsInOneEvent); //fill TimeSlot with digits from 1 event
Expand All @@ -73,7 +73,7 @@ class CPVPedestalCalibDevice : public o2::framework::Task
auto infoVecSize = mCalibrator->getCcdbInfoPedestalsVector().size();
auto pedsVecSize = mCalibrator->getPedestalsVector().size();
if (infoVecSize > 0) {
LOG(INFO) << "Created " << infoVecSize << " ccdb infos and " << pedsVecSize << " pedestal objects for TF " << tfcounter;
LOG(info) << "Created " << infoVecSize << " ccdb infos and " << pedsVecSize << " pedestal objects for TF " << tfcounter;
}
sendOutput(pc.outputs());
}
Expand All @@ -97,7 +97,7 @@ class CPVPedestalCalibDevice : public o2::framework::Task
for (uint32_t i = 0; i < payloadVec.size(); i++) {
auto& w = infoVec[i];
auto image = o2::ccdb::CcdbApi::createObjectImage(&payloadVec[i], &w);
LOG(INFO) << "Sending object " << w.getPath() << "/" << w.getFileName() << " of size " << image->size()
LOG(info) << "Sending object " << w.getPath() << "/" << w.getFileName() << " of size " << image->size()
<< " bytes, valid for " << w.getStartValidityTimestamp() << " : " << w.getEndValidityTimestamp();
output.snapshot(Output{o2::calibration::Utils::gDataOriginCDBPayload, "CPV_Pedestals", i}, *image.get()); // vector<char>
output.snapshot(Output{o2::calibration::Utils::gDataOriginCDBWrapper, "CPV_Pedestals", i}, w); // root-serialized
Expand Down Expand Up @@ -125,7 +125,7 @@ class CPVPedestalCalibDevice : public o2::framework::Task
for (uint32_t i = 0; i < payloadVec.size(); i++) {
auto& w = infoVec[i];
auto image = o2::ccdb::CcdbApi::createObjectImage(&payloadVec[i], &w);
LOG(INFO) << "Sending object " << w.getPath() << "/" << w.getFileName() << " of size " << image->size()
LOG(info) << "Sending object " << w.getPath() << "/" << w.getFileName() << " of size " << image->size()
<< " bytes, valid for " << w.getStartValidityTimestamp() << " : " << w.getEndValidityTimestamp();
output.snapshot(Output{o2::calibration::Utils::gDataOriginCDBPayload, what, i}, *image.get()); // vector<char>
output.snapshot(Output{o2::calibration::Utils::gDataOriginCDBWrapper, what, i}, w); // root-serialized
Expand Down
2 changes: 1 addition & 1 deletion Detectors/CPV/calib/testWorkflow/cpv-calib-workflow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
//auto doGain = configcontext.options().get<bool>("gains");
//auto doBadMap = configcontext.options().get<bool>("badmap");
//if (doPedestals && doGain) {
// LOG(FATAL) << "Can not run pedestal and gain calibration simulteneously";
// LOG(fatal) << "Can not run pedestal and gain calibration simulteneously";
// return specs;
//}
//if (doGain) {
Expand Down
6 changes: 3 additions & 3 deletions Detectors/CPV/reconstruction/src/Clusterer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void Clusterer::process(gsl::span<const Digit> digits, gsl::span<const TriggerRe
int indexStart = clusters->size();
mClusters.clear(); // internal list of FullClusters

LOG(DEBUG) << "Starting clusteriztion digits from " << mFirstDigitInEvent << " to " << mLastDigitInEvent;
LOG(debug) << "Starting clusteriztion digits from " << mFirstDigitInEvent << " to " << mLastDigitInEvent;

// Collect digits to clusters
makeClusters(digits);
Expand All @@ -67,7 +67,7 @@ void Clusterer::process(gsl::span<const Digit> digits, gsl::span<const TriggerRe
// Calculate properties of collected clusters (Local position, energy, disp etc.)
evalCluProperties(digits, clusters, dmc, cluMC);

LOG(DEBUG) << "Found clusters from " << indexStart << " to " << clusters->size();
LOG(debug) << "Found clusters from " << indexStart << " to " << clusters->size();

trigRec->emplace_back(tr.getBCData(), indexStart, clusters->size() - indexStart);
}
Expand Down Expand Up @@ -339,7 +339,7 @@ void Clusterer::evalCluProperties(gsl::span<const Digit> digits, std::vector<Clu
// may be soft digits remain after unfolding
clu->purify();

// LOG(DEBUG) << "Purify done";
// LOG(debug) << "Purify done";
clu->evalAll();

if (clu->getEnergy() > 1.e-4) { //Non-empty cluster
Expand Down
2 changes: 1 addition & 1 deletion Detectors/CPV/reconstruction/src/FullCluster.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ char FullCluster::getNumberOfLocalMax(gsl::span<int> maxAt) const
maxAt[iDigitN] = i;
iDigitN++;
if (iDigitN >= maxAt.size()) { // Note that size of output arrays is limited:
LOG(ERROR) << "Too many local maxima, cluster multiplicity " << mMulDigit;
LOG(error) << "Too many local maxima, cluster multiplicity " << mMulDigit;
return 0;
}
}
Expand Down
Loading