25 #define maxEventSize 4095 // (0x1FFE0000 >> 17) 27 #define POLL2_CORE_VERSION "1.4.14" 28 #define POLL2_CORE_DATE "Aug. 17th, 2016" 31 #define MAX_ORPH_DATA 1464 50 MCA_args(
bool useRoot_,
int totalTime_, std::string basename_);
68 void SetBasename(std::string basename_){ basename = basename_; }
93 unsigned char Data[4*(4050 + 4)];
168 typedef std::pair<unsigned int, unsigned int>
chanid_t;
169 std::map<chanid_t, PixieInterface::Histogram>
histoMap;
172 static const int statsInterval_ = 3;
191 bool start_run(
const bool &record_=
true,
const double &time_=-1.0);
203 void get_traces(
int mod_,
int chan_,
int thresh_=0);
206 std::vector<std::string> TabComplete(
const std::string &value_,
const std::vector<std::string> &valid_);
221 std::string get_filename();
224 bool CloseOutputFile(
const bool continueRun =
false);
227 bool OpenOutputFile(
bool continueRun =
false);
230 int write_data(
word_t *
data,
unsigned int nWords);
233 void broadcast_data(
word_t *
data,
unsigned int nWords);
236 void broadcast_pac_data();
243 bool SplitParameterArgs(
const std::string &arg,
int &start,
int &stop);
274 void SetNcards(
const size_t &n_cards_){ n_cards = n_cards_; }
305 void PrintModuleInfo();
308 void CommandControl();
323 bool IsNumeric(
const std::string &input_,
const std::string &prefix_=
"",
const std::string &msg_=
"");
329 std::string
pad_string(
const std::string &input_,
unsigned int length_);
332 std::string
yesno(
bool value_);
std::vector< word_t > * partialEvents
A vector to store the partial events.
std::string output_directory
Time to run the acquisition, in seconds.
Server * server
UDP client for network access.
bool Initialize(PixieInterface *pif_)
static const std::vector< std::string > pollStatusCommands_
bool record_data
Set to true when the command is given to stop a run.
std::string sys_message_head
The main pixie interface pointer.
int DataSize
Sequence number for reliable transport.
bool do_reboot
Set to true if data is to be recorded to disk.
void help(const char *progName_)
StatsHandler * statsHandler
std::vector< std::string > commands_
PixieInterface * pif
UDP server to listen for pacman commands.
double lastSpillTime
Time when the acquistion was started.
int DataSize
Sequence number for reliable transport.
bool do_start_acq
Set to true when the program is exiting.
void SetQuietMode(bool input_=true)
void SetThreshWords(const size_t &thresh_)
void SetNcards(const size_t &n_cards_)
std::map< chanid_t, PixieInterface::Histogram > histoMap
bool kill_all
Command line message header.
bool do_stop_acq
Set to true when the command is given to start a run.
bool IsNumeric(const std::string &input_, const std::string &prefix_="", const std::string &msg_="")
void SetUseRoot(bool state_=true)
unsigned int total_spill_chunks
Total number of poll data spill chunks sent over the network.
void SetDebugMode(bool input_=true)
void SetSendAlarm(bool input_=true)
static const std::vector< std::string > runControlCommands_
bool acq_running
Force poll2 to dump the current data spill.
void SetTotalTime(int totalTime_)
unsigned int next_run_num
Set with 'htit' command.
unsigned int udp_sequence
Pacman related variables.
std::string pad_string(const std::string &input_, unsigned int length_)
Pad a string with periods until it is the specified length_.
void SetWallClock(bool input_=true)
std::pair< unsigned int, unsigned int > chanid_t
static const std::vector< std::string > paramControlCommands_
void SetShowRates(bool input_=true)
bool init
Pacman shared-memory mode.
bool had_error
Set to true when run_command exits.
int BufLen
The data to be transmitted.
MCA_args mca_args
Set to true when the "mca" command is received.
bool force_spill
Set to true when the user tells POLL to reboot PIXIE.
PixieInterface::word_t word_t
void SetBootFast(bool input_=true)
void SetZeroClocks(bool input_=true)
bool pac_mode
New style shared-memory mode.
PollOutputFile output_file
std::string output_title
Set with 'ouf' command.
bool run_ctrl_exit
Set to true when run_command is recieving data from PIXIE.
void SetPacmanMode(bool input_=true)
void SetBasename(std::string basename_)
word_t eventdata_t[maxEventSize]
int TotalEvents
Number of useable bytes in Data.
std::string yesno(bool value_)
Return a string containing "yes" for value_==true and "no" for value_==false.
std::string GetBasename()
unsigned int output_format
Set with 'hnum' command.
Handles poll2 output data files.
void Close(PixieInterface *pif_)
std::string filename_prefix
Set with 'fdir' command.
unsigned short Events
Total number of events.
std::string humanReadable(double size)
Convert a rate number to more useful form.
void SetShmMode(bool input_=true)
int current_file_num
Set with 'oform' command.
unsigned short Cont
Number of events in this packet.
void SetTerminal(Terminal *term)
Set the terminal pointer.
bool boot_fast
Structure to hold arguments for MCA program.
struct tm * time_info
Time when the last spill finished.