39 mCaloAmp = 0xFFFFFFFF;
40 mCaloTime = 0xFFFFFFFF;
42 mTFNumber = ic.
options().
get<int64_t>(
"aod-timeframe-id");
43 mRunNumber = ic.
options().
get<
int>(
"run-number");
48 auto cput = mTimer.CpuTime();
53 if (mTFNumber == -1L) {
55 tfNumber = uint64_t(tinfo.firstTForbit) + (uint64_t(tinfo.runNumber) << 32);
59 const int runNumber = (mRunNumber == -1) ?
int(tinfo.runNumber) : mRunNumber;
64 LOG(info) <<
"FOUND " << cellsIn.size() <<
" EMC cells in CTF";
65 LOG(info) <<
"FOUND " << triggersIn.size() <<
" EMC tiggers in CTF";
74 auto caloCellsCursor = caloCellsBuilder->
cursor<o2::aod::Calos>();
75 auto caloCellsTRGTableCursor = caloCellsTRGTableBuilder->
cursor<o2::aod::CaloTriggers>();
78 mCaloEventHandler->
reset();
79 mCaloEventHandler->
setCellData(cellsIn, triggersIn);
81 uint64_t triggerMask = 1, inputMask = 1;
85 auto cellsInEvent = inputEvent.
mCells;
88 LOG(info) <<
"Found " << cellsInEvent.size() <<
" cells in event";
90 auto bcID = interactionRecord.
toLong();
98 for (
auto& cell : cellsInEvent) {
104 o2::math_utils::detail::truncateFloatFraction(cell.getAmplitude(), mCaloAmp),
105 o2::math_utils::detail::truncateFloatFraction(cell.getTimeStamp(), mCaloTime),
111 caloCellsTRGTableCursor(0,
147 LOGF(info,
"EMCAL Standalone AOD Producer total timing: Cpu: %.3e Real: %.3e s in %d slots",
148 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
153 std::vector<OutputSpec> outputs;
154 outputs.emplace_back(
OutputLabel{
"O2bc"},
"AOD",
"BC", 0, Lifetime::Timeframe);
155 outputs.emplace_back(
OutputLabel{
"O2collision"},
"AOD",
"COLLISION", 0, Lifetime::Timeframe);
156 outputs.emplace_back(
OutputLabel{
"O2caloCell"},
"AOD",
"CALO", 0, Lifetime::Timeframe);
157 outputs.emplace_back(
OutputLabel{
"O2caloCellTRGR"},
"AOD",
"CALOTRIGGER", 0, Lifetime::Timeframe);
158 outputs.emplace_back(
OutputSpec{
"TFN",
"TFNumber"});
159 outputs.emplace_back(
OutputSpec{
"TFF",
"TFFilename"});
162 "standalone-aod-producer-workflow",
169 ConfigParamSpec{
"run-number", VariantType::Int64, -1L, {
"The run-number. If left default we try to get it from DPL header."}},
170 ConfigParamSpec{
"aod-timeframe-id", VariantType::Int64, -1L, {
"Set timeframe number"}}}};
General auxilliary methods.
Convert CTF (EncodedBlocks) to AO2D EMCal standalone.
Handler for EMCAL event data.
EventData< CellInputType > buildEvent(int eventID) const
Build event information for a given event number within the timeframe.
void reset()
Reset containers with empty ranges.
void setCellData(CellRange cells, TriggerRange triggers)
Setting the data at cell level.
int getNumberOfEvents() const
Get the number of events handled by the event handler.
void run(o2::framework::ProcessingContext &pc) final
StandaloneAODProducerSpec()
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
static const char * getCellTriggerRecordBinding()
void init(o2::framework::InitContext &ic) final
static const char * getCellBinding()
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
decltype(auto) make(const Output &spec, Args... args)
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
InputRecord & inputs()
The inputs associated with this processing context.
ServiceRegistryRef services()
The services registry associated with this processing context.
Collisions_001 Collisions
framework::DataProcessorSpec getStandaloneAODProducerSpec()
create a processor spec
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
EMCAL event information (per trigger)
gsl::span< const InputType > mCells
EMCAL cells / digits.
InteractionRecord mInteractionRecord
Interaction record for the trigger corresponding to this event.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"