Commit c4527b8a authored by J.Dudouet [IPNL/CSNSM]'s avatar J.Dudouet [IPNL/CSNSM]
Browse files

adapt KeyWatchers to anc0 and anc2, remove vamos dependance


git-svn-id: svn+ssh://anonsvn.in2p3.fr/agata/gammaware/trunk@2239 c3abf467-7ff2-0310-b516-c5fb849bdde0
parent 614124d4
...@@ -50,21 +50,18 @@ KeyWatcher::KeyWatcher( const char * name, const char * title, TDirectory *sp_di ...@@ -50,21 +50,18 @@ KeyWatcher::KeyWatcher( const char * name, const char * title, TDirectory *sp_di
fHistInMinMetaSync = MakeTH1<TH1F>((TString)name+"_12hour_MetaSync",(TString)title+" on 12 hour for meta sync frames (1bin=6s)",7200,0,720); fHistInMinMetaSync = MakeTH1<TH1F>((TString)name+"_12hour_MetaSync",(TString)title+" on 12 hour for meta sync frames (1bin=6s)",7200,0,720);
fHistInHMetaSync = MakeTH1<TH1F>((TString)name+"_2days_MetaSync",(TString)title+" on 2 days for meta sync frames (1bin=6min)",480,0,48); fHistInHMetaSync = MakeTH1<TH1F>((TString)name+"_2days_MetaSync",(TString)title+" on 2 days for meta sync frames (1bin=6min)",480,0,48);
const int NMess = 10; const int NMess = 14;
fHistMessageType = MakeTH1<TH1I>("MessageType","Message type",NMess,0,NMess); fHistMessageType = MakeTH1<TH1I>("MessageType","Message type",NMess,0,NMess);
TString labels[NMess] = {"event:data","event:data:psa","","data:tracked","data:psa","data:ranc0","data:ccrystal","data:crystal","conf:global","meta:sync"}; TString labels[NMess] = {"event:data","event:data:psa","event:data:ranc0","event:data:ranc1","","data:crystal","data:ccrystal","data:psa","data:ranc0","data:ranc1","data:tracked","","conf:global","meta:sync"};
for(int i=0 ; i<NMess ; i++) fHistMessageType->GetXaxis()->SetBinLabel(i+1,labels[i]); for(int i=0 ; i<NMess ; i++) fHistMessageType->GetXaxis()->SetBinLabel(i+1,labels[i]);
fHistFold = MakeTH1<TH1I>("CrystalFold","CrystalFold",20,0,20); fHistFold = MakeTH1<TH1I>("CrystalFold","CrystalFold",20,0,20);
fHistDTPSA = MakeTH1<TH1I>("TimeStampSpreadPSA","Time stamp spread in the event:data:psa frame",190,0,1900); fHistDTPSA = MakeTH1<TH1I>("TimeStampSpreadPSA","Time stamp spread in the event:data:psa frame",190,0,1900);
fHistDTEvent = MakeTH1<TH1I>("TS_vamos-TS_agata","Time stamp spread in the event:data frame",600,-3000,3000);
fHistDTPerCrystal = MakeTH2<TH2I>("TimeStampSpreadPerCrystal","Time stamp spread in the event:data:psa frame per crystal ID",50,0,50,190,0,1900); fHistDTPerCrystal = MakeTH2<TH2I>("TimeStampSpreadPerCrystal","Time stamp spread in the event:data:psa frame per crystal ID",50,0,50,190,0,1900);
fHistDTEventPerCrystal = MakeTH2<TH2I>("Tvamos-TAgata_per_crystal","Time VAMOS - Time AGATA per crystal",50,0,50,600,-3000,3000); fHistDTAnc0 = MakeTH1<TH1I>("TS_anc0-TS_agata","Time stamp spread in the event:data frame between agata and anc0",600,-3000,3000);
fHistDTAnc1 = MakeTH1<TH1I>("TS_anc1-TS_agata","Time stamp spread in the event:data frame between agata and anc1",600,-3000,3000);
fBufferToRead = new BufferIO(); fBufferToRead = new BufferIO();
...@@ -343,12 +340,16 @@ void KeyWatcher::Exec(Option_t * /*option*/) ...@@ -343,12 +340,16 @@ void KeyWatcher::Exec(Option_t * /*option*/)
fBufferToRead->SetEffectiveSize(MainKey->GetFrameLength()-20u); fBufferToRead->SetEffectiveSize(MainKey->GetFrameLength()-20u);
double DTEvent = 0.; double DTEvent = 0.;
double DTEventPC[50];
ULong64_t TimeAGATA=0; ULong64_t TimeAGATA=0;
ULong64_t TimeAGATAPC[50]; ULong64_t TimeAGATAPC[50];
for(int i=0 ; i<50 ; i++) TimeAGATA = 0; for(int i=0 ; i<50 ; i++)
ULong64_t TimeVamos=0; TimeAGATA = 0;
bool IsVamos = false; ULong64_t TimeAnc0=0;
ULong64_t TimeAnc1=0;
bool IsAnc0 = false;
bool IsAnc1 = false;
bool IsAGATA = false; bool IsAGATA = false;
if ( MessageType.Contains("event") ) if ( MessageType.Contains("event") )
...@@ -435,10 +436,13 @@ void KeyWatcher::Exec(Option_t * /*option*/) ...@@ -435,10 +436,13 @@ void KeyWatcher::Exec(Option_t * /*option*/)
} }
if(SubMess=="data:ranc0" && MessageType=="event:data") if(SubMess=="data:ranc0" && MessageType=="event:data")
{ {
TimeVamos = timestamp; TimeAnc0 = timestamp;
IsVamos = true; IsAnc0 = true;
// double DTEvent = (timestamp-fTimestamp)*10; }
// fHistDTEvent->Fill(DTEvent); if(SubMess=="data:ranc1" && MessageType=="event:data")
{
TimeAnc1 = timestamp;
IsAnc1 = true;
} }
if(SubMess=="data:psa") if(SubMess=="data:psa")
{ {
...@@ -466,18 +470,15 @@ void KeyWatcher::Exec(Option_t * /*option*/) ...@@ -466,18 +470,15 @@ void KeyWatcher::Exec(Option_t * /*option*/)
fHistFold->Fill(Fold); fHistFold->Fill(Fold);
} }
if(IsVamos&&IsAGATA) if(IsAnc0&&IsAGATA)
{ {
DTEvent = (double)(TimeVamos*1.-TimeAGATA*1.)*10; DTEvent = (double)(TimeAnc0*1.-TimeAGATA*1.)*10;
fHistDTEvent->Fill(DTEvent); fHistDTAnc0->Fill(DTEvent);
for(int i=0 ; i<50 ; i++) }
{ if(IsAnc1&&IsAGATA)
if(TimeAGATAPC[i]!=0) {
{ DTEvent = (double)(TimeAnc1*1.-TimeAGATA*1.)*10;
DTEventPC[i] = (TimeVamos*1.-TimeAGATAPC[i]*1.)*10; fHistDTAnc1->Fill(DTEvent);
fHistDTEventPerCrystal->Fill(i,DTEventPC[i]);
}
}
} }
} }
...@@ -633,21 +634,21 @@ void KeyWatcher::ShowMessageType() ...@@ -633,21 +634,21 @@ void KeyWatcher::ShowMessageType()
gPad->SetBottomMargin(bottommarg); gPad->SetBottomMargin(bottommarg);
gPad->SetLogy(); gPad->SetLogy();
fHistDTEvent->SetBit(TH1::kNoTitle); fHistDTAnc0->SetBit(TH1::kNoTitle);
fHistDTEvent->GetYaxis()->SetTitle("Counts"); fHistDTAnc0->GetYaxis()->SetTitle("Counts");
fHistDTEvent->GetYaxis()->SetTitleSize(0.09); fHistDTAnc0->GetYaxis()->SetTitleSize(0.09);
fHistDTEvent->GetYaxis()->SetLabelSize(0.08); fHistDTAnc0->GetYaxis()->SetLabelSize(0.08);
fHistDTEvent->GetYaxis()->SetTitleOffset(0.4); fHistDTAnc0->GetYaxis()->SetTitleOffset(0.4);
fHistDTEvent->GetXaxis()->SetTitle("#DeltaT Event (ns)"); fHistDTAnc0->GetXaxis()->SetTitle("#DeltaT Event (ns)");
fHistDTEvent->GetXaxis()->SetTitleSize(0.09); fHistDTAnc0->GetXaxis()->SetTitleSize(0.09);
fHistDTEvent->GetXaxis()->SetLabelSize(0.08); fHistDTAnc0->GetXaxis()->SetLabelSize(0.08);
fHistDTEvent->Draw(); fHistDTAnc0->Draw();
gPad->Modified(); gPad->Modified();
gPad->Update(); gPad->Update();
st = (TPaveStats*)fHistDTEvent->FindObject("stats"); st = (TPaveStats*)fHistDTAnc0->FindObject("stats");
if(st) if(st)
{ {
st->SetX2NDC(1-rightmarg); st->SetX2NDC(1-rightmarg);
...@@ -684,8 +685,11 @@ void KeyWatcher::ShowMessageType() ...@@ -684,8 +685,11 @@ void KeyWatcher::ShowMessageType()
{ {
st->SetX2NDC(1-rightmarg); st->SetX2NDC(1-rightmarg);
st->SetY2NDC(1-topmarg); st->SetY2NDC(1-topmarg);
st->SetX1NDC(0.743455);
st->SetY1NDC(0.672483);
} }
c->cd(4)->cd(2); c->cd(4)->cd(2);
gPad->SetRightMargin(rightmarg); gPad->SetRightMargin(rightmarg);
...@@ -694,27 +698,28 @@ void KeyWatcher::ShowMessageType() ...@@ -694,27 +698,28 @@ void KeyWatcher::ShowMessageType()
gPad->SetBottomMargin(bottommarg); gPad->SetBottomMargin(bottommarg);
gPad->SetLogz(); gPad->SetLogz();
fHistDTEventPerCrystal->SetBit(TH1::kNoTitle); fHistDTAnc1->SetBit(TH1::kNoTitle);
fHistDTEventPerCrystal->GetYaxis()->SetTitle("#DeltaT VAMOS - AGATA (ns)"); fHistDTAnc1->GetYaxis()->SetTitle("Counts");
fHistDTEventPerCrystal->GetYaxis()->SetTitleSize(0.09); fHistDTAnc1->GetYaxis()->SetTitleSize(0.09);
fHistDTEventPerCrystal->GetYaxis()->SetLabelSize(0.08); fHistDTAnc1->GetYaxis()->SetLabelSize(0.08);
fHistDTEventPerCrystal->GetYaxis()->SetTitleOffset(0.4); fHistDTAnc1->GetYaxis()->SetTitleOffset(0.4);
fHistDTEventPerCrystal->GetXaxis()->SetTitle("Crystal ID"); fHistDTAnc1->GetXaxis()->SetTitle("#DeltaT Event (ns)");
fHistDTEventPerCrystal->GetXaxis()->SetTitleSize(0.09); fHistDTAnc1->GetXaxis()->SetTitleSize(0.09);
fHistDTEventPerCrystal->GetXaxis()->SetLabelSize(0.08); fHistDTAnc1->GetXaxis()->SetLabelSize(0.08);
fHistDTEventPerCrystal->Draw("col"); fHistDTAnc1->Draw();
gPad->Modified(); gPad->Modified();
gPad->Update(); gPad->Update();
st = (TPaveStats*)fHistDTEventPerCrystal->FindObject("stats"); st = (TPaveStats*)fHistDTAnc1->FindObject("stats");
if(st) if(st)
{ {
st->SetX2NDC(1-rightmarg); st->SetX2NDC(1-rightmarg);
st->SetY2NDC(1-topmarg); st->SetY2NDC(1-topmarg);
st->SetX1NDC(0.743455);
st->SetY1NDC(0.672483);
} }
} }
void KeyWatcher::DumpKeys(bool ActiveDump) void KeyWatcher::DumpKeys(bool ActiveDump)
......
...@@ -51,9 +51,10 @@ protected: ...@@ -51,9 +51,10 @@ protected:
TH1 *fHistMessageType; TH1 *fHistMessageType;
TH1 *fHistFold; TH1 *fHistFold;
TH1 *fHistDTPSA; TH1 *fHistDTPSA;
TH1 *fHistDTEvent;
TH2 *fHistDTPerCrystal; TH2 *fHistDTPerCrystal;
TH2 *fHistDTEventPerCrystal;
TH1 *fHistDTAnc0;
TH1 *fHistDTAnc1;
ULong64_t FirstTimeStamp; ULong64_t FirstTimeStamp;
ULong64_t FirstEventNumber; ULong64_t FirstEventNumber;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment