Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming endl to RESTendl and other loggers functions #49

Merged
merged 3 commits into from
May 25, 2022
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
6 changes: 3 additions & 3 deletions inc/TRestDetectorAvalancheProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ class TRestDetectorAvalancheProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

metadata << " reference energy (Eref): " << fEnergyRef << endl;
metadata << " resolution at Eref : " << fResolutionAtEref << endl;
metadata << " detector gain : " << fDetectorGain << endl;
RESTMetadata << " reference energy (Eref): " << fEnergyRef << RESTendl;
RESTMetadata << " resolution at Eref : " << fResolutionAtEref << RESTendl;
RESTMetadata << " detector gain : " << fDetectorGain << RESTendl;

EndPrintProcess();
}
Expand Down
6 changes: 3 additions & 3 deletions inc/TRestDetectorDaqChannelSwitchingProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ class TRestDetectorDaqChannelSwitchingProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

metadata << "module's daq channel re-definition: " << endl;
RESTMetadata << "module's daq channel re-definition: " << RESTendl;
auto iter = fFirstDaqChannelDef.begin();
while (iter != fFirstDaqChannelDef.end()) {
metadata << "module id: " << iter->first << " first daq channel: " << iter->second << endl;
RESTMetadata << "module id: " << iter->first << " first daq channel: " << iter->second << RESTendl;
iter++;
}
metadata << endl;
RESTMetadata << RESTendl;

EndPrintProcess();
}
Expand Down
16 changes: 8 additions & 8 deletions inc/TRestDetectorElectronDiffusionProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ class TRestDetectorElectronDiffusionProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

metadata << " eField : " << fElectricField * units("V/cm") << " V/cm" << endl;
metadata << " attachment coeficient : " << fAttachment << " V/cm" << endl;
metadata << " gas pressure : " << fGasPressure << " atm" << endl;
metadata << " longitudinal diffusion coefficient : " << fLonglDiffCoeff << " cm^1/2" << endl;
metadata << " transversal diffusion coefficient : " << fTransDiffCoeff << " cm^1/2" << endl;
metadata << " W value : " << fWvalue << " eV" << endl;
RESTMetadata << " eField : " << fElectricField * units("V/cm") << " V/cm" << RESTendl;
RESTMetadata << " attachment coeficient : " << fAttachment << " V/cm" << RESTendl;
RESTMetadata << " gas pressure : " << fGasPressure << " atm" << RESTendl;
RESTMetadata << " longitudinal diffusion coefficient : " << fLonglDiffCoeff << " cm^1/2" << RESTendl;
RESTMetadata << " transversal diffusion coefficient : " << fTransDiffCoeff << " cm^1/2" << RESTendl;
RESTMetadata << " W value : " << fWvalue << " eV" << RESTendl;

metadata << " Maximum number of hits : " << fMaxHits << endl;
RESTMetadata << " Maximum number of hits : " << fMaxHits << RESTendl;

metadata << " seed : " << fSeed << endl;
RESTMetadata << " seed : " << fSeed << RESTendl;

EndPrintProcess();
}
Expand Down
8 changes: 4 additions & 4 deletions inc/TRestDetectorGarfieldDriftProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ class TRestDetectorGarfieldDriftProcess : public TRestEventProcess {

// std::cout << "Electric field : " << fElectricField << " V/cm"
// << endl;
metadata << "Drift electrode potential : " << fDriftPotential << " V" << endl;
metadata << "Gas pressure : " << fGasPressure << " atm" << endl;
metadata << "Electron reduction factor : " << fPEReduction << endl;
metadata << "Drift stop distance : " << fStopDistance << " mm" << endl;
RESTMetadata << "Drift electrode potential : " << fDriftPotential << " V" << RESTendl;
RESTMetadata << "Gas pressure : " << fGasPressure << " atm" << RESTendl;
RESTMetadata << "Electron reduction factor : " << fPEReduction << RESTendl;
RESTMetadata << "Drift stop distance : " << fStopDistance << " mm" << RESTendl;

EndPrintProcess();
}
Expand Down
36 changes: 18 additions & 18 deletions inc/TRestDetectorGas.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class TRestDetectorGas : public TRestDetectorDriftVolume {
inline TString GetGasComponentName(Int_t n) {
if (n >= GetNofGases()) {
std::cout << "REST WARNING. Gas name component n=" << n << " requested. But only "
<< GetNofGases() << " component(s) in the mixture." << endl;
<< GetNofGases() << " component(s) in the mixture." << std::endl;
return "";
}
return fGasComponentName[n];
Expand All @@ -174,47 +174,47 @@ class TRestDetectorGas : public TRestDetectorDriftVolume {

Double_t GetDriftVelocity() const override {
if (fElectricField == 0) {
warning << "TRestDetectorGas::GetDriftVelocity. Warning fElectricField is zero!" << endl;
warning << " - Use: TRestDetectorGas::SetElectricField( field[V/mm] ) to set the field value"
<< endl;
RESTWarning << "TRestDetectorGas::GetDriftVelocity. Warning fElectricField is zero!" << RESTendl;
RESTWarning << " - Use: TRestDetectorGas::SetElectricField( field[V/mm] ) to set the field value"
<< RESTendl;
}
return GetDriftVelocity(fElectricField * units("V/cm")) / units("cm/us");
} // in standard unit mm/us

/// Returns the longitudinal diffusion in (cm)^1/2
Double_t GetLongitudinalDiffusion() const override {
if (fElectricField == 0) {
warning << "TRestDetectorGas::GetLongitudinalDiffusion. Warning fElectricField is zero!" << endl;
warning << " - Use: TRestDetectorGas::SetElectricField( field[V/mm] ) to set the field value"
<< endl;
RESTWarning << "TRestDetectorGas::GetLongitudinalDiffusion. Warning fElectricField is zero!" << RESTendl;
RESTWarning << " - Use: TRestDetectorGas::SetElectricField( field[V/mm] ) to set the field value"
<< RESTendl;
}
return GetLongitudinalDiffusion(fElectricField * units("V/cm"));
}

/// Returns the transversal diffusion in (cm)^1/2
Double_t GetTransversalDiffusion() const override {
if (fElectricField == 0) {
warning << "TRestDetectorGas::GetTransversalDiffusion. Warning fElectricField is zero!" << endl;
warning << " - Use: TRestDetectorGas::SetElectricField( field[V/mm] ) to set the field value"
<< endl;
RESTWarning << "TRestDetectorGas::GetTransversalDiffusion. Warning fElectricField is zero!" << RESTendl;
RESTWarning << " - Use: TRestDetectorGas::SetElectricField( field[V/mm] ) to set the field value"
<< RESTendl;
}
return GetTransversalDiffusion(fElectricField * units("V/cm"));
}

Double_t GetTownsendCoefficient() const override {
if (fElectricField == 0) {
warning << "TRestDetectorGas::GetTownsendCoefficient. Warning fElectricField is zero!" << endl;
warning << " - Use: TRestDetectorGas::SetElectricField( field[V/mm] ) to set the field value"
<< endl;
RESTWarning << "TRestDetectorGas::GetTownsendCoefficient. Warning fElectricField is zero!" << RESTendl;
RESTWarning << " - Use: TRestDetectorGas::SetElectricField( field[V/mm] ) to set the field value"
<< RESTendl;
}
return GetTownsendCoefficient(fElectricField * units("V/cm"));
}

Double_t GetAttachmentCoefficient() const override {
if (fElectricField == 0) {
warning << "TRestDetectorGas::GetAttachmentCoefficient. Warning fElectricField is zero!" << endl;
warning << " - Use: TRestDetectorGas::SetElectricField( field[V/mm] ) to set the field value"
<< endl;
RESTWarning << "TRestDetectorGas::GetAttachmentCoefficient. Warning fElectricField is zero!" << RESTendl;
RESTWarning << " - Use: TRestDetectorGas::SetElectricField( field[V/mm] ) to set the field value"
<< RESTendl;
}
return GetAttachmentCoefficient(fElectricField * units("V/cm"));
}
Expand All @@ -225,7 +225,7 @@ class TRestDetectorGas : public TRestDetectorDriftVolume {
inline Double_t GetGasComponentFraction(Int_t n) {
if (n >= GetNofGases()) {
std::cout << "REST WARNING. Gas fraction for component n=" << n << " requested. But only "
<< GetNofGases() << " component(s) in the mixture." << endl;
<< GetNofGases() << " component(s) in the mixture." << std::endl;
return 0.;
}

Expand All @@ -251,7 +251,7 @@ class TRestDetectorGas : public TRestDetectorDriftVolume {
void PlotTransversalDiffusion(Double_t eMin, Double_t eMax, Int_t nSteps);
void PlotTownsendCoefficient(Double_t eMin, Double_t eMax, Int_t nSteps);
void PrintGasInfo();
inline void PrintGasFileContent() { std::cout << fGasFileContent << endl; };
inline void PrintGasFileContent() { std::cout << fGasFileContent << std::endl; };

/// Prints the metadata information from the gas
void PrintMetadata() override { PrintGasInfo(); }
Expand Down
24 changes: 12 additions & 12 deletions inc/TRestDetectorHitsAnalysisProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ class TRestDetectorHitsAnalysisProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

if (fCylinderFiducial) metadata << "Cylinder fiducial active" << endl;
if (fPrismFiducial) metadata << "Prism fiducial active" << endl;

metadata << " -------------------" << endl;
metadata << " Fiducial parameters" << endl;
metadata << " -------------------" << endl;
metadata << " x0 : (" << fFid_x0.X() << " , " << fFid_x0.Y() << " , " << fFid_x0.Z() << ")" << endl;
metadata << " x1 : (" << fFid_x1.X() << " , " << fFid_x1.Y() << " , " << fFid_x1.Z() << ")" << endl;
metadata << " R : " << fFid_R << endl;
metadata << " sX : " << fFid_sX << endl;
metadata << " sY : " << fFid_sY << endl;
metadata << " -------------------" << endl;
if (fCylinderFiducial) RESTMetadata << "Cylinder fiducial active" << RESTendl;
if (fPrismFiducial) RESTMetadata << "Prism fiducial active" << RESTendl;

RESTMetadata << " -------------------" << RESTendl;
RESTMetadata << " Fiducial parameters" << RESTendl;
RESTMetadata << " -------------------" << RESTendl;
RESTMetadata << " x0 : (" << fFid_x0.X() << " , " << fFid_x0.Y() << " , " << fFid_x0.Z() << ")" << RESTendl;
RESTMetadata << " x1 : (" << fFid_x1.X() << " , " << fFid_x1.Y() << " , " << fFid_x1.Z() << ")" << RESTendl;
RESTMetadata << " R : " << fFid_R << RESTendl;
RESTMetadata << " sX : " << fFid_sX << RESTendl;
RESTMetadata << " sY : " << fFid_sY << RESTendl;
RESTMetadata << " -------------------" << RESTendl;

EndPrintProcess();
}
Expand Down
2 changes: 1 addition & 1 deletion inc/TRestDetectorHitsNormalizationProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class TRestDetectorHitsNormalizationProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

metadata << " Renormalization factor : " << fFactor << endl;
RESTMetadata << " Renormalization factor : " << fFactor << RESTendl;

EndPrintProcess();
}
Expand Down
8 changes: 4 additions & 4 deletions inc/TRestDetectorHitsReductionProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ class TRestDetectorHitsReductionProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

metadata << " Starting distance : " << fStartingDistance << endl;
metadata << " Minimum distance : " << fMinimumDistance << endl;
metadata << " Distance step factor : " << fDistanceFactor << endl;
metadata << " Maximum number of nodes : " << fMaxNodes << endl;
RESTMetadata << " Starting distance : " << fStartingDistance << RESTendl;
RESTMetadata << " Minimum distance : " << fMinimumDistance << RESTendl;
RESTMetadata << " Distance step factor : " << fDistanceFactor << RESTendl;
RESTMetadata << " Maximum number of nodes : " << fMaxNodes << RESTendl;

EndPrintProcess();
}
Expand Down
12 changes: 6 additions & 6 deletions inc/TRestDetectorHitsRotateAndTranslateProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ class TRestDetectorHitsRotateAndTranslateProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

metadata << " delta x : " << fDeltaX << endl;
metadata << " delta y : " << fDeltaY << endl;
metadata << " delta z : " << fDeltaZ << endl;
metadata << " alpha : " << fAlpha << endl;
metadata << " beta : " << fBeta << endl;
metadata << " gamma : " << fGamma << endl;
RESTMetadata << " delta x : " << fDeltaX << RESTendl;
RESTMetadata << " delta y : " << fDeltaY << RESTendl;
RESTMetadata << " delta z : " << fDeltaZ << RESTendl;
RESTMetadata << " alpha : " << fAlpha << RESTendl;
RESTMetadata << " beta : " << fBeta << RESTendl;
RESTMetadata << " gamma : " << fGamma << RESTendl;

EndPrintProcess();
}
Expand Down
2 changes: 1 addition & 1 deletion inc/TRestDetectorHitsShuffleProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class TRestDetectorHitsShuffleProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

metadata << " Iterations : " << fIterations << endl;
RESTMetadata << " Iterations : " << fIterations << RESTendl;

EndPrintProcess();
}
Expand Down
4 changes: 2 additions & 2 deletions inc/TRestDetectorHitsSmearingProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class TRestDetectorHitsSmearingProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

metadata << " reference energy (ERef): " << fEnergyRef << endl;
metadata << " resolution at ERef : " << fResolutionAtERef << endl;
RESTMetadata << " reference energy (ERef): " << fEnergyRef << RESTendl;
RESTMetadata << " resolution at ERef : " << fResolutionAtERef << RESTendl;

EndPrintProcess();
}
Expand Down
8 changes: 4 additions & 4 deletions inc/TRestDetectorHitsToSignalProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ class TRestDetectorHitsToSignalProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

metadata << "Sampling : " << fSampling << " us" << endl;
metadata << "Electric field : " << fElectricField * units("V/cm") << " V/cm" << endl;
metadata << "Gas pressure : " << fGasPressure << " atm" << endl;
metadata << "Drift velocity : " << fDriftVelocity << " mm/us" << endl;
RESTMetadata << "Sampling : " << fSampling << " us" << RESTendl;
RESTMetadata << "Electric field : " << fElectricField * units("V/cm") << " V/cm" << RESTendl;
RESTMetadata << "Gas pressure : " << fGasPressure << " atm" << RESTendl;
RESTMetadata << "Drift velocity : " << fDriftVelocity << " mm/us" << RESTendl;

EndPrintProcess();
}
Expand Down
18 changes: 9 additions & 9 deletions inc/TRestDetectorPositionMappingProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ class TRestDetectorPositionMappingProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

metadata << "the mode is:" << endl;
metadata << (fApplyGainCorrection ? "> " : " ")
<< "Apply position correction std::map for spectrum " << endl;
metadata << (fCreateGainMap ? "> " : " ") << "Create new correction std::map for each position"
<< endl;
metadata << "output mapping file: " << fMappingSave << endl;
metadata << "Energy cut for Threshold integral: " << any(fEnergyCutRange) << endl;
metadata << "Energy cut for NGoodSignals: " << any(fNHitsCutRange) << endl;
metadata << "Binning: " << fNBinsX << ", " << fNBinsY << ", " << fNBinsZ << endl;
RESTMetadata << "the mode is:" << RESTendl;
RESTMetadata << (fApplyGainCorrection ? "> " : " ")
<< "Apply position correction std::map for spectrum " << RESTendl;
RESTMetadata << (fCreateGainMap ? "> " : " ") << "Create new correction std::map for each position"
<< RESTendl;
RESTMetadata << "output mapping file: " << fMappingSave << RESTendl;
RESTMetadata << "Energy cut for Threshold integral: " << any(fEnergyCutRange) << RESTendl;
RESTMetadata << "Energy cut for NGoodSignals: " << any(fNHitsCutRange) << RESTendl;
RESTMetadata << "Binning: " << fNBinsX << ", " << fNBinsY << ", " << fNBinsZ << RESTendl;

EndPrintProcess();
}
Expand Down
16 changes: 8 additions & 8 deletions inc/TRestDetectorSignalChannelActivityProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,16 @@ class TRestDetectorSignalChannelActivityProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

metadata << "Low signal threshold activity : " << fLowThreshold << endl;
metadata << "High signal threshold activity : " << fHighThreshold << endl;
RESTMetadata << "Low signal threshold activity : " << fLowThreshold << RESTendl;
RESTMetadata << "High signal threshold activity : " << fHighThreshold << RESTendl;

metadata << "Number of daq histogram channels : " << fDaqHistogramChannels << endl;
metadata << "Start daq channel : " << fDaqStartChannel << endl;
metadata << "End daq channel : " << fDaqEndChannel << endl;
RESTMetadata << "Number of daq histogram channels : " << fDaqHistogramChannels << RESTendl;
RESTMetadata << "Start daq channel : " << fDaqStartChannel << RESTendl;
RESTMetadata << "End daq channel : " << fDaqEndChannel << RESTendl;

metadata << "Number of readout histogram channels : " << fReadoutHistogramChannels << endl;
metadata << "Start readout channel : " << fReadoutStartChannel << endl;
metadata << "End readout channel : " << fReadoutEndChannel << endl;
RESTMetadata << "Number of readout histogram channels : " << fReadoutHistogramChannels << RESTendl;
RESTMetadata << "Start readout channel : " << fReadoutStartChannel << RESTendl;
RESTMetadata << "End readout channel : " << fReadoutEndChannel << RESTendl;

EndPrintProcess();
}
Expand Down
12 changes: 6 additions & 6 deletions inc/TRestDetectorSignalToHitsProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ class TRestDetectorSignalToHitsProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

metadata << "Electric field : " << fElectricField * units("V/cm") << " V/cm" << endl;
metadata << "Gas pressure : " << fGasPressure << " atm" << endl;
metadata << "Drift velocity : " << fDriftVelocity << " mm/us" << endl;
metadata << "Signal to hits method : " << fMethod << endl;
RESTMetadata << "Electric field : " << fElectricField * units("V/cm") << " V/cm" << RESTendl;
RESTMetadata << "Gas pressure : " << fGasPressure << " atm" << RESTendl;
RESTMetadata << "Drift velocity : " << fDriftVelocity << " mm/us" << RESTendl;
RESTMetadata << "Signal to hits method : " << fMethod << RESTendl;
if (fMethod == "intwindow") {
metadata << "Threshold : " << fThreshold << " ADC" << endl;
metadata << "Integral window : " << fIntWindow << " us" << endl;
RESTMetadata << "Threshold : " << fThreshold << " ADC" << RESTendl;
RESTMetadata << "Integral window : " << fIntWindow << " us" << RESTendl;
}

EndPrintProcess();
Expand Down
2 changes: 1 addition & 1 deletion inc/TRestDetectorSignalViewerProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TRestDetectorSignalViewerProcess : public TRestEventProcess {
void PrintMetadata() override {
BeginPrintProcess();

std::cout << "Refresh value : " << fDrawRefresh << endl;
std::cout << "Refresh value : " << fDrawRefresh << std::endl;

EndPrintProcess();
}
Expand Down
Loading