7#define CBMTASKUNPACK_H 1
13#if !defined(__CLING__) && !defined(__ROOTCLING__)
35#include <boost/filesystem.hpp>
46namespace fs = boost::filesystem;
90 virtual void Exec(Option_t* opt);
111 virtual InitStatus
Init();
149 template<
class Unpacker>
150 auto RunUnpacker(
const std::unique_ptr<Unpacker>& unpacker,
const fles::Timeslice& ts,
Monitor& monitor)
153 template<
typename TVecobj>
154 Bool_t
RegisterVector(FairRootManager* ioman, std::vector<TVecobj>*& vec);
156 template<
typename TVecobj>
157 typename std::enable_if<std::is_member_function_pointer<
decltype(&TVecobj::GetTime)>::value,
void>::type
160 if (vec ==
nullptr)
return;
161 std::sort(vec->begin(), vec->end(),
162 [](
const TVecobj& a,
const TVecobj& b) ->
bool { return a.GetTime() < b.GetTime(); });
Type traits for online algorithms.
This file contains the definition of the ParFiles class.
Collection of digis from all detector systems within one timeslice.
Source class for reading from archived time slice data.
Task class for associating digis to events.
Bool_t RegisterVector(FairRootManager *ioman, std::vector< TVecobj > *&vec)
virtual ~CbmTaskUnpack()
Destructor.
virtual void Exec(Option_t *opt)
Task execution.
CbmTaskUnpack()
Constructor.
bool fCbmrootFormatOutput
std::vector< CbmMuchDigi > * fMuchDigis
std::unique_ptr< cbm::algo::sts::Unpack > fStsUnpack
std::unique_ptr< cbm::algo::trd::Unpack > fTrdUnpack
std::unique_ptr< cbm::algo::trd2d::Unpack > fTrd2dUnpack
CbmTimeSlice * fTimeslice
=> Time-slice header (old version, class about to be deprecated? one should use only CbmTsEventHeader...
ClassDef(CbmTaskUnpack, 4)
std::vector< CbmTofDigi > * fTofDigis
std::vector< CbmStsDigi > * fStsDigis
CbmTsEventHeader * fTsEventHeader
Time-slice event header.
std::vector< CbmBmonDigi > * fBmonDigis
=> Branch vectors of Digis
virtual InitStatus Init()
Task initialisation.
std::unique_ptr< cbm::algo::rich::Unpack > fRichUnpack
virtual void Finish()
Finish timeslice.
void SetOutputModeCbmrootLike(bool flag=true)
Set the output file in "as if cbmroot digi file" mode (default is "as if rra")
std::vector< CbmRichDigi > * fRichDigis
std::unique_ptr< cbm::algo::bmon::Unpack > fBmonUnpack
std::unique_ptr< cbm::algo::tof::Unpack > fTofUnpack
std::vector< CbmTrdDigi > * fTrdDigis
void SetMonitor(cbm::Monitor *monitor)
Set the monitor object.
auto RunUnpacker(const std::unique_ptr< Unpacker > &unpacker, const fles::Timeslice &ts, Monitor &monitor) -> cbm::algo::algo_traits::Output_t< Unpacker >
std::enable_if< std::is_member_function_pointer< decltype(&TVecobj::GetTime)>::value, void >::type Timesort(std::vector< TVecobj > *vec=nullptr)
CbmTaskUnpack & operator=(const CbmTaskUnpack &)=delete
Assignment operator (disabled)
CbmDigiTimeslice * fDigiTimeslice
Output data if writing root files "as if rra".
std::unique_ptr< cbm::algo::much::Unpack > fMuchUnpack
CbmTaskUnpack(const CbmTaskUnpack &)=delete
Copy constructor (disabled)
Bookkeeping of time-slice content.
typename std::tuple_element< 0, ResultOf_t< Algo > >::type Output_t
Type alias for the output type produced by an algorithm.