small mods trying to get influx working and channels set for raisor run
This commit is contained in:
parent
b9158237e4
commit
b30e87392f
|
@ -11,7 +11,7 @@
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "TLine.h"
|
//#include "TLine.h"
|
||||||
//#include <TMarker.h>
|
//#include <TMarker.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -188,7 +188,7 @@ inline void BeamTune::UpdateHistograms(){
|
||||||
|
|
||||||
|
|
||||||
// Create the line and store it in the vector
|
// Create the line and store it in the vector
|
||||||
TLine *line = new TLine(Xr, Yr, X2, Y2);
|
//TLine *line = new TLine(Xr, Yr, X2, Y2);
|
||||||
//line->SetLineColor(kBlack);
|
//line->SetLineColor(kBlack);
|
||||||
// Set line color based on Y2 value
|
// Set line color based on Y2 value
|
||||||
/*
|
/*
|
||||||
|
@ -213,8 +213,8 @@ inline void BeamTune::UpdateHistograms(){
|
||||||
//markers.push_back(endMarker);
|
//markers.push_back(endMarker);
|
||||||
|
|
||||||
|
|
||||||
hFrame->Fill(Xr,Yr, sX2,Y2);
|
//hFrame->Fill(Xr,Yr, sX2,Y2);
|
||||||
hFrame1->Fill(X2,Y2);
|
//hFrame1->Fill(X2,Y2);
|
||||||
|
|
||||||
// Draw all the lines after the loop
|
// Draw all the lines after the loop
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ public:
|
||||||
evtbder->SetTimeWindow(500);
|
evtbder->SetTimeWindow(500);
|
||||||
|
|
||||||
//========== use the influx from the Analyzer
|
//========== use the influx from the Analyzer
|
||||||
influx = new InfluxDB("https://fsunuc.physics.fsu.edu/influx/");
|
influx = new InfluxDB("http://localhost:8086");
|
||||||
dataBaseName = "testing";
|
dataBaseName = "testing";
|
||||||
|
|
||||||
SetUpCanvas(); // see below
|
SetUpCanvas(); // see below
|
||||||
|
@ -145,9 +145,9 @@ inline void Cross::UpdateHistograms(){
|
||||||
|
|
||||||
for( int k = 0; k < (int) event.size(); k++ ){
|
for( int k = 0; k < (int) event.size(); k++ ){
|
||||||
//event[k].Print();
|
//event[k].Print();
|
||||||
if( event[k].ch == 6 ) {ch1 = event[k].energy; t1 = event[k].timestamp;} // Reads channel 6 of the digitizer corresponding to dE
|
if( event[k].ch == 0 ) {ch1 = event[k].energy; t1 = event[k].timestamp;} // Reads channel 0 of the digitizer corresponding to dE
|
||||||
if( event[k].ch == 7 ) {ch4 = event[k].energy; t4 = event[k].timestamp;} // Reads channel 7 of the digitizer corresponding to E
|
if( event[k].ch == 2 ) {ch4 = event[k].energy; t4 = event[k].timestamp;} // Reads channel 2 of the digitizer corresponding to E
|
||||||
if( event[k].ch == 1 ) {ch7 = event[k].energy; t7 = event[k].timestamp;}
|
if( event[k].ch == 7 ) {ch7 = event[k].energy; t7 = event[k].timestamp;} //RF Timing if setup
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,9 +157,9 @@ inline void Cross::UpdateHistograms(){
|
||||||
hdE->Fill(ch1);
|
hdE->Fill(ch1);
|
||||||
hE->Fill(ch4);
|
hE->Fill(ch4);
|
||||||
hdT->Fill(ch7);
|
hdT->Fill(ch7);
|
||||||
hTotE->Fill(ch1*0.25*0.25 + ch4);
|
hTotE->Fill(ch1 + ch4);
|
||||||
hdEE->Fill(ch4,ch1);
|
hdEE->Fill(ch4,ch1);
|
||||||
hdEtotE->Fill(ch1*0.25*0.25 + ch4,ch1);
|
hdEtotE->Fill(ch1 + ch4,ch1);
|
||||||
hdEdT->Fill((t7-t1)*1e9,ch1);
|
hdEdT->Fill((t7-t1)*1e9,ch1);
|
||||||
hTWin->Fill((t4-t1)*1e9);
|
hTWin->Fill((t4-t1)*1e9);
|
||||||
|
|
||||||
|
@ -210,21 +210,21 @@ inline void Cross::UpdateHistograms(){
|
||||||
hdEtotE->UpdatePlot();
|
hdEtotE->UpdatePlot();
|
||||||
hdEdT->UpdatePlot();
|
hdEdT->UpdatePlot();
|
||||||
hTWin->UpdatePlot();
|
hTWin->UpdatePlot();
|
||||||
/*
|
|
||||||
//========== output to Influx
|
//========== output to Influx
|
||||||
QList<QString> cutNameList = hPID->GetCutNameList();
|
QList<QString> cutNameList1 = hdEE->GetCutNameList();
|
||||||
for( int p = 0; p < cutList.count(); p ++){
|
for( int p = 0; p < cutList1.count(); p ++){
|
||||||
if( cutList[p].isEmpty() ) continue;
|
if( cutList1[p].isEmpty() ) continue;
|
||||||
double dT = (tMax[p]-tMin[p]) * tick2ns / 1e9; // tick to sec
|
double dT = (tMax1[p]-tMin1[p]) / 1e9; // tick to sec
|
||||||
double rate = count[p]*1.0/(dT);
|
double rate = count1[p]*1.0/(dT);
|
||||||
//printf("%llu %llu, %f %d\n", tMin[p], tMax[p], dT, count[p]);
|
//printf("%llu %llu, %f %d\n", tMin1[p], tMax1[p], dT, count1[p]);
|
||||||
//printf("%10s | %d | %f Hz \n", cutNameList[p].toStdString().c_str(), count[p], rate);
|
printf("%10s | %d | %f Hz \n", cutNameList1[p].toStdString().c_str(), count1[p], rate);
|
||||||
|
|
||||||
influx->AddDataPoint("Cut,name=" + cutNameList[p].toStdString()+ " value=" + std::to_string(rate));
|
influx->AddDataPoint("Cut,name=" + cutNameList1[p].toStdString()+ " value=" + std::to_string(rate));
|
||||||
influx->WriteData(dataBaseName);
|
influx->WriteData("testing");
|
||||||
influx->ClearDataPointsBuffer();
|
influx->ClearDataPointsBuffer();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -145,9 +145,9 @@ inline void Target::UpdateHistograms(){
|
||||||
|
|
||||||
for( int k = 0; k < (int) event.size(); k++ ){
|
for( int k = 0; k < (int) event.size(); k++ ){
|
||||||
//event[k].Print();
|
//event[k].Print();
|
||||||
if( event[k].ch == 6 ) {ch1 = event[k].energy; t1 = event[k].timestamp;} // Reads channel 6 of the digitizer corresponding to dE
|
if( event[k].ch == 4 ) {ch1 = event[k].energy; t1 = event[k].timestamp;} // Reads channel 6 of the digitizer corresponding to dE
|
||||||
if( event[k].ch == 7 ) {ch4 = event[k].energy; t4 = event[k].timestamp;} // Reads channel 7 of the digitizer corresponding to E
|
if( event[k].ch == 6 ) {ch4 = event[k].energy; t4 = event[k].timestamp;} // Reads channel 7 of the digitizer corresponding to E
|
||||||
if( event[k].ch == 1 ) {ch7 = event[k].energy; t7 = event[k].timestamp;}
|
if( event[k].ch == 7 ) {ch7 = event[k].energy; t7 = event[k].timestamp;}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,9 +157,9 @@ inline void Target::UpdateHistograms(){
|
||||||
hdE->Fill(ch1);
|
hdE->Fill(ch1);
|
||||||
hE->Fill(ch4);
|
hE->Fill(ch4);
|
||||||
hdT->Fill(ch7);
|
hdT->Fill(ch7);
|
||||||
hTotE->Fill(ch1*0.25*0.25 + ch4);
|
hTotE->Fill(ch1 + ch4);
|
||||||
hdEE->Fill(ch4,ch1);
|
hdEE->Fill(ch4,ch1);
|
||||||
hdEtotE->Fill(ch1*0.25*0.25 + ch4,ch1);
|
hdEtotE->Fill(ch1 + ch4,ch1);
|
||||||
hdEdT->Fill((t7-t1)*1e9,ch1);
|
hdEdT->Fill((t7-t1)*1e9,ch1);
|
||||||
hTWin->Fill((t4-t1)*1e9);
|
hTWin->Fill((t4-t1)*1e9);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user