DataSet::DataSet(TString RootFilePath, TString ProcessName, float XSection, float Lum, TString ReferenceHistogramPath) { SetProcessName( ProcessName) ; SetCrossSection(XSection); SetLuminosity(Lum); ReferenceHistogramPath_ = ReferenceHistogramPath; RootFilePath_ = RootFilePath; SetScaleFactor(1); SetNumberOfGeneratedEvents(0); SetNumberOfScaledEvents(0); }
void MacXPlatform::initialize(int argc, char *argv[]) { #ifdef QT_DEBUG return; #endif setMacXActivationPolicy(); SetProcessName(QString::fromUtf8("MEGAsync")); fd = -1; if (argc) { long int value = strtol(argv[argc-1], NULL, 10); if (value > 0 && value < INT_MAX) { fd = value; } } if (fd < 0) { if (!enableSetuidBit()) { ::exit(0); } //Reboot QString app = MegaApplication::applicationDirPath(); QString launchCommand = QString::fromUtf8("open"); QStringList args = QStringList(); QDir appPath(app); appPath.cdUp(); appPath.cdUp(); args.append(QString::fromAscii("-n")); args.append(appPath.absolutePath()); QProcess::startDetached(launchCommand, args); sleep(2); ::exit(0); } }
void ZProcess::ParseXML_Document( ) { // For each node we store data // If it's a Process Node, and the Root node if ( IsRoot( ) && IsTag( "<PROCESS>" ) ) { // Handle Attributes if ( IsValidAttribute( "name" ) ) SetProcessName( GetAttributeValue( ) ); } // If it's the WriteLog Node in a Process node if ( IsTag( "<WRITELOG>" ) && IsChildOf( "<PROCESS>" ) ) { // Set the WriteLog File Name SetWriteLogValue( GetTextValue( ) ); // Handle Attributes if ( IsValidAttribute( "name" ) ) this->SetWriteLogName( GetAttributeValue( ) ); } // If it's the KillApp Node in a Process node if ( IsTag("<SHUTDOWN>") && IsChildOf( "<PROCESS>") ) { // Set the KillApp command name SetKillAppValue( GetTextValue( ) ); // Handle Attributes if ( IsValidAttribute( "delay" ) ) { int delay; sscanf( GetAttributeValue( ) , "%d" , &delay ); SetKillAppDelay( delay ); } } // If it's the Startup Node in a Process node if ( IsTag("<STARTUP>") && IsChildOf( "<PROCESS>") ) { // Set the Startup command name SetStartupValue( GetTextValue( ) ); // Handle Attributes if ( IsValidAttribute( "delay" ) ) { int delay; sscanf( GetAttributeValue( ) , "%d" , &delay ); SetStartupDelay( delay ); } } // If it's the NOTE node in a PROCESS node if ( IsTag("<NOTE>") && IsChildOf( "<PROCESS>") ) { // do nothing ... just checking } // If it's the CDATA section on NOTE node if ( IsChildOf( "<NOTE>" ) && IsCDataSection( ) ) { // Set the Note value CString val; val = GetTextValue( ); SetNote( val ); } }