File indexing completed on 2026-07-16 08:13:57
0001 #include "StreamingBcoCheck.h"
0002
0003
0004 #include "StreamingBcoInfo.h"
0005 #include "StreamingLumiInfo.h"
0006
0007
0008
0009 #include <ffaobjects/SyncDefs.h>
0010 #include <ffaobjects/SyncObject.h>
0011
0012 #include <ffarawobjects/Gl1Packet.h>
0013
0014 #include <fun4all/Fun4AllReturnCodes.h>
0015 #include <fun4all/SubsysReco.h> // for SubsysReco
0016 #include <fun4all/Fun4AllHistoManager.h>
0017 #include <fun4all/Fun4AllServer.h>
0018
0019
0020 #include <phool/PHCompositeNode.h>
0021 #include <phool/PHNode.h> // for PHNode
0022 #include <phool/PHNodeIterator.h> // for PHNodeIterator
0023 #include <phool/getClass.h>
0024 #include <phool/phool.h> // for PHWHERE
0025
0026
0027 #include <iostream>
0028
0029 StreamingBcoCheck::StreamingBcoCheck(const std::string &name)
0030 : SubsysReco(name)
0031 {
0032 return;
0033 }
0034
0035 int StreamingBcoCheck::Init(PHCompositeNode *topNode)
0036 {
0037 int iret = CreateNodeTree(topNode);
0038
0039 return iret;
0040 }
0041
0042 int StreamingBcoCheck::CreateNodeTree(PHCompositeNode *topNode)
0043 {
0044 PHNodeIterator iter(topNode);
0045 PHCompositeNode *dstNode;
0046 dstNode = dynamic_cast<PHCompositeNode *>(iter.findFirst("PHCompositeNode", "DST"));
0047 if (!dstNode)
0048 {
0049 std::cout << PHWHERE << " DST Node is missing doing nothing" << std::endl;
0050 return Fun4AllReturnCodes::ABORTRUN;
0051 }
0052 return Fun4AllReturnCodes::EVENT_OK;
0053 }
0054
0055 int StreamingBcoCheck::process_event(PHCompositeNode *topNode)
0056 {
0057 StreamingBcoInfo *streaming_bco_info = findNode::getClass<StreamingBcoInfo>(topNode, "STREAMINGBCOINFO");
0058 if (streaming_bco_info)
0059 {
0060 if (Verbosity() > 1)
0061 {
0062 std::cout << "bco : " << streaming_bco_info->get_bco() << std::endl;
0063 std::cout << "usable bco tag : " << streaming_bco_info->get_usable_bco_tag() << std::endl;
0064 std::cout << "bco streaming window : (" << streaming_bco_info->get_bco_streaming_window().first << ", " << streaming_bco_info->get_bco_streaming_window().second << ")" << std::endl;
0065 }
0066 }
0067
0068 return Fun4AllReturnCodes::EVENT_OK;
0069 }