GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
DroppedData.C
Go to the documentation of this file.
1void DroppedData(TFile* file)
2{
3 //Finds the number of dropped Midas events as well as the number of lost events over the network.
4 TTree* tree = (TTree*)file->Get("FragmentTree");
5
6 long entries = tree->GetEntries();
7 double packetRatio = ((double)entries) / ((double)(tree->GetMaximum("NetworkPacketNumber") - tree->GetMinimum("NetworkPacketNumber")));
8 // double filterRatio = ((double)entries)/((double)(tree->GetMaximum("MidasId") - tree->GetMinimum("MidasId")));
9
10 double packetLost = tree->GetMaximum("NetworkPacketNumber") - tree->GetMinimum("NetworkPacketNumber") - entries;
11 // double filterLost = tree->GetMaximum("MidasId") - tree->GetMinimum("MidasId") - entries;
12
13 std::cout << "Got " << packetRatio * 100. << " % of the network packets (lost " << packetLost << " packets" << std::endl;
14 // std::cout<<"Got "<<packetRatio*100.<<" % of the network packets and "<<filterRatio*100.<<" % of the primary filter IDs (lost "<<packetLost<<" packets and "<<filterLost<<" IDs)"<<std::endl;
15}
void DroppedData(TFile *file)
Definition DroppedData.C:1