11 , m_dir_base(dir_base)
26 SQEvent* evt = findNode::getClass<SQEvent>(startNode,
"SQEvent");
28 cout <<
PHWHERE <<
"SQEvent not found. Abort." << endl;
32 int sp_id = (evt->
get_spill_id() / m_sp_step) * m_sp_step;
33 if (m_run_id != run_id || m_sp_id != sp_id) {
41 cout <<
PHWHERE <<
"RUN not found. Abort." << endl;
49 oss << m_dir_base <<
"/run_" << setfill(
'0') << setw(6) << run_id;
50 gSystem->mkdir(oss.str().c_str(),
true);
51 oss <<
"/run_" << setw(6) << run_id <<
"_spill_" << setw(9) << sp_id <<
"_spin.root";
57 cout <<
PHWHERE <<
"Could not open " << oss.str() <<
". Abort." << endl;
Fun4AllSpillDstOutputManager(const std::string &dir_base, const std::string &myname="SPILLDSTOUT")
virtual int get_run_id() const =0
Return the run ID.
PHNode * findFirst(const std::string &, const std::string &)
PHBoolean SetCompressionLevel(const int level)
virtual ~Fun4AllSpillDstOutputManager()
static Fun4AllServer * instance()
virtual int Write(PHCompositeNode *startNode)
write starting from given node
virtual int get_spill_id() const =0
Return the spill ID.
int run(const int nEvents=1)
std::string outfilename
output file name
int Write(PHCompositeNode *startNode)
write starting from given node
An SQ interface class to hold one event header.
virtual int WriteNode(PHCompositeNode *thisNode)
write specified node