38 ic.
options().
get<std::string>(
"tof-digit-infile"));
39 mDelayInMuSec1TF = atof(ic.
options().
get<std::string>(
"delay-1st-tf").c_str()) * 1E6;
41 mFile.reset(TFile::Open(
filename.c_str()));
42 if (!mFile->IsOpen()) {
43 LOG(error) <<
"Cannot open the " <<
filename.c_str() <<
" file !";
52 static bool firstCall =
true;
54 usleep(mDelayInMuSec1TF);
62 std::unique_ptr<TTree> treeDig((TTree*)mFile->Get(
"o2sim"));
65 treeDig->SetBranchAddress(
"TOFDigit", &mPdigits);
66 treeDig->SetBranchAddress(
"TOFReadoutWindow", &mProw);
67 treeDig->SetBranchAddress(
"TOFPatterns", &mPpatterns);
70 treeDig->SetBranchAddress(
"TOFDigitMCTruth", &mPlabels);
73 treeDig->GetEntry(mCurrentEntry);
77 for (
auto digit : mDigits) {
78 mFiller.
addCount(digit.getChannel());
101 LOG(
debug) <<
"TOF: Sending ROMode= " << roMode <<
" to GRPUpdater";
104 LOG(error) <<
"Cannot read the TOF digits !";
110 if (mCurrentEntry >= treeDig->GetEntries()) {
119 std::vector<OutputSpec> outputs;
135 {
"tof-digit-infile", VariantType::String,
"tofdigits.root", {
"Name of the input file"}},
136 {
"delay-1st-tf", VariantType::String,
"none", {
"delay in seconds before 1st TF"}},
137 {
"input-dir", VariantType::String,
"none", {
"Input directory"}}}};
Header of the General Run Parameters object.
Definition of the Names Generator class.
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
ServiceRegistryRef services()
The services registry associated with this processing context.
virtual void endOfStream(EndOfStreamContext &context)
This is invoked whenever we have an EndOfStream event.
void setTFIDInfo(const o2::dataformats::TFIDInfo &val)
void setTimeStamp(int val)
void run(ProcessingContext &pc) final
void init(InitContext &ic) final
Diagnostic & getDiagnosticFrequency()
void addCount(int channel)
void setReadoutWindowData(const VROF &row, const VPAT &pattern)
void fillDiagnosticFrequency()
constexpr o2::header::DataOrigin gDataOriginTOF
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
framework::DataProcessorSpec getDigitReaderSpec(bool useMC)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static void fillTFIDInfo(o2::framework::ProcessingContext &pc, o2::dataformats::TFIDInfo &ti)
static std::string rectifyDirectory(const std::string_view p)
static std::string concat_string(Ts const &... ts)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"